import 'dart:convert';

import 'package:mziot/generated/json/base/json_field.dart';
import 'package:mziot/generated/json/scene_info_entity.g.dart';

@JsonSerializable()
class SceneInfoEntity {
  int? id;
  String? sceneName;
  String? sceneBackImg;
  String? sceneStartTime;
  String? sceneEndTime;
  bool? sceneSwitch;
  bool? lockStatus;
  String? timezoneCode;
  List<int>? groupIds;
  List<String>? groupNames;
  String? remark;
  int? lightRate;
  List<SceneInfoMomentVo>? momentVo;

  SceneInfoEntity();

  factory SceneInfoEntity.fromJson(Map<String, dynamic> json) => $SceneInfoEntityFromJson(json);

  Map<String, dynamic> toJson() => $SceneInfoEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SceneInfoMomentVo {
  int? id;
  String? start;
  int? startHour;
  int? startMinute;
  String? end;
  int? endHour;
  int? endMinute;
  int? lightRate;

  SceneInfoMomentVo();

  factory SceneInfoMomentVo.fromJson(Map<String, dynamic> json) => $SceneInfoMomentVoFromJson(json);

  Map<String, dynamic> toJson() => $SceneInfoMomentVoToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
